﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace XCSerialPort
{
    public struct MyData
    {
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
        public int[] data;
        public IntPtr cMessage;
        public bool bResult;
    };
    public class CadjHelp
    {
        [DllImport("X86/cadjColor.dll", EntryPoint = "para_gen", CallingConvention = CallingConvention.Cdecl)]
        public extern static void para_gen86(ref MyData Data, string savepath, string readpath, double[,] point, double[,] boundary, double[] paraWidth, int[] ijudge);

        [DllImport("X64/cadjColor.dll", EntryPoint = "para_gen", CallingConvention = CallingConvention.Cdecl)]
        public extern static void para_gen64(ref MyData Data, string savepath, string readpath, double[,] point, double[,] boundary, double[] paraWidth, int[] ijudge);

        [DllImport("X86/cadjColor.dll", EntryPoint = "colorenhance", CallingConvention = CallingConvention.Cdecl)]
        public extern static void colorenhance86(ref MyData Data, string path, int[] ijudge, double[,] boundary, double[] paraWidth, double[] para);
        [DllImport("X64/cadjColor.dll", EntryPoint = "colorenhance", CallingConvention = CallingConvention.Cdecl)]
        public extern static void colorenhance64(ref MyData Data, string path, int[] ijudge, double[,] boundary, double[] paraWidth, double[] para);


        [DllImport("X86/cadjColor.dll", EntryPoint = "colorzone", CallingConvention = CallingConvention.Cdecl)]
        public extern static void colorzone86(ref MyData Data, string path, int[] ijudge, double[,] boundary, double[] paraWidth, double[] para);
        [DllImport("X64/cadjColor.dll", EntryPoint = "colorzone", CallingConvention = CallingConvention.Cdecl)]
        public extern static void colorzone64(ref MyData Data, string path, int[] ijudge, double[,] boundary, double[] paraWidth, double[] para);


        [DllImport("X86/cadjColor.dll", EntryPoint = "chromasuppress", CallingConvention = CallingConvention.Cdecl)]
        public extern static void chromasuppress86(ref MyData Data, string path, int[] ijudge, double[,] boundary, double[] paraWidth, double[] para);
        [DllImport("X64/cadjColor.dll", EntryPoint = "chromasuppress", CallingConvention = CallingConvention.Cdecl)]
        public extern static void chromasuppress64(ref MyData Data, string path, int[] ijudge, double[,] boundary, double[] paraWidth, double[] para);



    }
}
